<!DOCTYPE html>
<html lang="zh-Hans-CN" >
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width" />
    <meta name="robots" content="all" />
<!--    <meta name="keywords" content="${SITE_CONFIG.SITE_KWD}">
    <meta name="description" content="${SITE_CONFIG.SITE_DESC}">
    <title text="${SITE_CONFIG.SITE_NAME}+ ' - 主页'"></title>-->
    <link href="/source/layui/css/layui.css" rel="stylesheet" type="text/css">
    <link href="/source/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="/source/css/index_style.css" rel="stylesheet" type="text/css">
    <link href="/source/css/animate.min.css" rel="stylesheet" type="text/css">
  <!--  <link rel="stylesheet" href="/source/layui/css/layui.css" />-->

    <!--
        <link rel="stylesheet" href="/source/css/master.css" />
        <link rel="stylesheet" href="/source/css/gloable.css" />
        <link rel="stylesheet" href="/source/css/nprogress.css" />

       <link rel="stylesheet" href="/source/css/blog.css"/>
        <link rel="stylesheet" href="/source/css/timeline.css" />-->
</head>
<body>
    <div id="App">
        <link rel="stylesheet" v-if="path!='/'" href="/source/css/master.css" />
        <keep-alive>
            <router-view :key="key" />
        </keep-alive>
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.min.js"></script>
    <script src="https://unpkg.com/http-vue-loader"></script>
    <script src="https://unpkg.com/vue-router@3.0.1/dist/vue-router.js"></script>
    <script src="https://cdn.bootcss.com/qs/6.7.0/qs.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
    <script src="/source/layui/layui.js"></script>
    <script src="/source/js/wow.min.js"></script>
    <script src="/source/js/index.js"></script>
    <script type="module">
        const home = httpVueLoader('./views/home.vue');
        const guestbook = httpVueLoader('./views/guestbook.vue');
        const archive = httpVueLoader('./views/diary.vue');
      //  const blog = httpVueLoader('./views/blog.vue');
      //  const article = httpVueLoader('./views/article.vue');
     //   const search = httpVueLoader('./views/search.vue');
        new Vue({
            el:'#App',
            data() {
                return {
                }
            },
            router:new VueRouter({
              //  mode: 'history',
                routes:[
                     {path:'/',component:home,meta:{title:'主页'}},
                     {path:'/archive',component:archive,meta:{title:'归档'}},
                     {path:'/guestbook',component:guestbook,meta:{title:'留言板'}},
            //        {path:'/search',component:search}
                ]
            }),
            computed:{
                key(){
                    return this.$route.path + Math.random();
                },
                path(){
                    return  this.$route.path;
                },
                /* 第二步：在路由守卫router.beforeEach中设置如下代码 */
                router.beforeEach((to, from, next) => {
                    /* 路由发生变化修改页面title */
                    if (to.meta.title) {
                        document.title = to.meta.title
                    }
                })

            },
            methods: {

            }
        });
    </script>
</body>
</html>